<template>
	<view class="top_bar" :style="{background: 'url(' + backgroundUrl + ')', 'background-size': '100% 100%', 'background-repeat': 'no-repeat'}">
		<view style="height:var(--status-bar-height);"></view>
		<view class="bar">
			<image class="arrow" :src=" arrowBlack " @click="backClick()"></image>
		</view>
		<view class="title">{{ title }}</view>
	</view>
</template>

<script>
export default {
	name: "lawBankTopBar",
	props: {
		title: {
			type: String,
			default: ""
		},
		isBackClick: {
			type: Boolean,
			default: true
		},
		backgroundUrl: {
			type: String,
			default: ""
		}
	},
	data() {
		return {
			arrowBlack: require('@/static/img/components/ic_arrow_black.png'),
		};
	},
	methods: {
		//点击返回
		backClick() {
			this.$emit('backClick');
			if (this.isBackClick)
				uni.navigateBack({
					delta: 1
				});
		},
	}
}
</script>

<style lang="scss">
.top_bar {
	width: 100vw;
	position: relative;
	height: 320rpx;

	.bar {
		height: 80rpx;

		.arrow {
			padding: 20rpx;
			position: absolute;
			width: 40rpx;
			height: 40rpx;
			z-index: 99;
		}
	}

	.title {
		margin-top: 30rpx;
		padding-left: 30rpx;
		font-size: 50rpx;
		font-weight: 700;
		color: #333333;
		line-height: 40rpx;
	}
}
</style>